package com.hmall.order.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hmall.order.pojo.Order;
import com.hmall.order.pojo.OrderDetail;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

public interface OrderDetailsMapper extends BaseMapper<OrderDetail> {

    void addOrderDetails(@Param("orderId") Long orderId,@Param("itemId") Long itemId,@Param("num") Integer num,@Param("name") String name,
                         @Param("spec") String spec, @Param("price")Long price, @Param("image")String image);

    @Select("select * from tb_order_detail where order_id = #{id}")
    OrderDetail findOrderDetailsById(Long id);
}
